#ifndef _TCPSOCKIMPL_H_
#define _TCPSOCKIMPL_H_

#include "stdafx.h"
#include <io/iasynio.h>

class CTcpSocketImpl :	public	ITcpSocket,
						public	CUnknownImp

{
public:
	CTcpSocketImpl(void);
	virtual ~CTcpSocketImpl(void);
	UNKNOWN_IMP1(ITcpSocket);
	//////////////////////////////////////////////////////////////////////////
	//IIoDevice
	std_method(ReadIo)(IIoOperation* pOperation);
	std_method(WriteIo)(IIoOperation* pOperation);
	std_method(ReadAllIo)(IIoOperation* pOperation);
	std_method(WriteAllIo)(IIoOperation* pOperation);
	std_method(ConnectIo)(IIoOperation* pOperation);
	std_method(AcceptConnect)(IIoOperation* pOperation);
	std_method(CloseIo)();
	std_method(OpenIo)();
	std_method(BindIo)();
	//////////////////////////////////////////////////////////////////////////
	//ISocket
	std_method_(os_sock_t,GetSocket)();
	std_method(BindSocket)(os_sock_t sock);
	//////////////////////////////////////////////////////////////////////////
	//ITcpSocket
	std_method(SetReuseAddr)(bool bstart);
	std_method(SetNoDelay)(bool bstart);
	std_method(SetLinger)(bool bstart);
	std_method(SetKeepalive)(bool bstart);
	std_method(SetCork)(bool bstart);
	std_method(SetNoSigPipe)(bool bstart);
	std_method(SetNonblock)(bool bstart);
	std_method(SendBufLen)(ULONG size);
	std_method(RecvBufLen)(ULONG size);
	std_method(SendTimeOut)(int sec);
	std_method(RecvTimeOut)(int sec);
	std_method(ConnectTimeOut)(int sec);
	std_method(SendLoWat)(int size);
	std_method(RecvLoWat)(int size);
    //////////////////////////////////////////////////////////////////////////
	os_sock_t		m_socketFd;

private:




};







#endif